#pragma once

#include <QDockWidget>
#include <osg\ref_ptr>
#include <QVector>
#include "actorbase.h"
#include "publicgui_global.h"

class QTreeWidget;
class QPushButton;
class QTreeWidgetItem;
class QCheckBox;

namespace PublicGui
{
	class PUBLICGUI_EXPORT ObjectsTreeInSceneDockWidget:public QDockWidget
	{
		Q_OBJECT
	public:
		ObjectsTreeInSceneDockWidget(QWidget* parent = 0,Qt::WindowFlags flags = 0);
		~ObjectsTreeInSceneDockWidget();

	private slots:
		void slotsCurrentMapChanged();
		void slotsClearScene();
		void slotsSelectClick(bool);
		void slotsCancelClick(bool);
		void slotsRefreshClick(bool);
		void slotStateChanged(int);
		void slotsSelecteActorObjectChanged(QVector<CoreBase::ActorBase*>);
	protected:
		virtual void showEvent(QShowEvent* event);
	private:
		void initGui();
		void constructTree(QTreeWidgetItem* parent,CoreBase::ActorBase* actor);
		QTreeWidget*						_objectTreeWidget;
		QPushButton*						_selectButton;
		QPushButton*						_cancelButton;
		QPushButton*						_refreshButton;
		QCheckBox*							_checkBox;
	};
}